<?php
/**
 * Created by PhpStorm.
 * User: July
 * Date: 2019/3/20
 * Time: 14:36
 */

use yii\helpers\Html;
use yii\grid\GridView;
use yii\widgets\Pjax;

$this->title = '发送卡券消息列表';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="brands-index">

    <h1><?= Html::encode($this->title) ?></h1>
    <?php Pjax::begin(); ?>
    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'columns' => [
            ['class' => 'yii\grid\SerialColumn'],
            'touser',
            'card_id',
            [
                'attribute' => 'send_time',
                'label' => '发送时间',
                'value' => function ($model) {
                    return date('Y-m-d H:i:s', $model->send_time);

                }
            ]
        ],
    ]); ?>
    <?php Pjax::end(); ?>
</div>